import { request } from '@boeyo/portal';

/**
 * 监测列表树形列表
 */
export const fetchStructureTree = (data = {}) => {
  return request({
    url: '/monitoring/tree',
    method: 'POST',
    data,
  });
};

/**
 * 首页测点列表
 */
export const getPointList = (params?: any) => {
  return request({
    url: '/bigScreen/pointList',
    method: 'GET',
    params,
  });
};

/**
 * 二维场景触发统计信息
 */
export const getTriggerStatistics = (params?: any) => {
  return request({
    url: '/largeScreenDate/getTriggerStatistics',
    method: 'GET',
    params,
  });
};

/**
 * 二维场景监测阵下拉列表
 */
export const structureList = (params?: any) => {
  return request({
    url: '/bigScreen/structureList',
    method: 'GET',
    params,
  });
};

/**
 * 二维场景告警统计
 */
export const alertStatistics = (params) => {
  return request({
    url: '/bigScreen/alertStatistics',
    method: 'GET',
    params,
  });
};

/**
 * 二维场景历史告警 1=设备离线，2=测点触发，3=台站触发 不要4
 */
export const historyAlert = (params) => {
  return request({
    url: '/bigScreen/historyAlert',
    method: 'GET',
    params,
  });
};

/**
 * 二维场景:监测阵详情
 */
export const structureDetail = (structureId) => {
  return request({
    url: `/bigScreen/structureDetail/${structureId}`,
    method: 'GET',
  });
};

/**
 * 获取测点排行信息
 */
export const getAlarmMeasuringPoint = (params: any) => {
  return request({
    url: '/largeScreenDate/getAlarmMeasuringPoint',
    method: 'GET',
    params,
  });
};

/**
 * 二维场景预览详情
 */
export const getScene2dPreviewDetail = (params: any) => {
  return request({
    url: '/largeScreenDate/scene2dPreview',
    method: 'GET',
    params,
  });
};

/**
 * 获取设备所属项目下拉框数据
 */
export const getDeviceProjectSelect = () => {
  return request({
    url: '/project/selectList',
    method: 'GET',
  });
};

/**
 * 二维场景设备总览详情
 */
export const getDeviceOverviewDate = (params) => {
  return request({
    url: '/largeScreenDate/getDeviceOverviewDate',
    method: 'GET',
    params,
  });
};

/**
 * 获取测点统计信息
 */
export const getAlarmMeasuringPointStatistics = (params) => {
  return request({
    url: '/largeScreenDate/getAlarmMeasuringPointStatistics',
    method: 'GET',
    params,
  });
};
/**
 * 近期国内地震信息top10
 */
export const recentEarthquakeInfo = () => {
  return request({
    url: '/workbenches/recentEarthquakeInfo',
    method: 'GET',
  });
};

/**
 * 台站列表
 */
export const fetchStationNetwork = () => {
  return request({
    url: 'stationsNetworkManage/list',
    method: 'GET',
    params: { pageSize: 100000 },
  });
};
